home *** CD-ROM | disk | FTP | other *** search
- {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
- The purchaser of these procedures and functions may include them in COMPILED
- programs freely, but may not sell or give away the source text.
-
- Of course, CIRCLE works only in a graphics mode!
-
- The procedure CIRCLE has six parameters:
- H and K: the XY coordinates of the circle's center
- R : itsRadius
- Res : the Resolution. This is proportional to
- the actual number of pixels used to draw the
- circle
- Aspect : Adjust this value until the circles are ROUND on
- your particular screen and for the particular
- graphics mode you are using.
- Color : set to 0, 1, 2, or 3
-
-
- }
- {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}
- procedure circle(H,K,R,Res : integer; Aspect : real; Color : byte);
- var
- X, Y, Theta : integer;
- begin
- for Theta := 1 to trunc(pi*2*Res) do
- begin
- X := H + trunc( R * sin(Theta/Res));
- Y := K + trunc(Aspect * ( R * cos(Theta/Res)));
- plot(X,Y,Color);
- end;
- end;
- {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}